package com.cloudlead.forwardAction.action;

import com.cloudlead.common.lang.BusinessModule;
import com.cloudlead.common.lang.annotation.Label;
import com.cloudlead.common.worker.action.impl.AbstractActionFactory;
import com.cloudlead.common.worker.annotation.Action;
import com.cloudlead.common.worker.annotation.Order;
import com.cloudlead.forwardAction.BusinessModules;
import com.cloudlead.forwardAction.service.BookingSpaceReceiptEditSer;
import com.cloudlead.forwardService.BookingSpaceReceiptEditService;
import com.cloudlead.forwardService.vo.MoveContainerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.validation.constraints.NotNull;

/**
 * Created by wyj on 2015/9/6.
 */
@Controller
public class BookingSpaceReceiptEditActionFactory extends AbstractActionFactory implements BookingSpaceReceiptEditService {
    public BookingSpaceReceiptEditActionFactory() {
        super(BusinessModules.BookingSpaceReceiptEdit);
    }

    @Autowired
    BookingSpaceReceiptEditSer bookingSpaceReceiptEditSer;

    @Override
    @Action
    @Order(1)
    @Label("创建订舱回执")
    public String createBookingSpaceReceipt(@NotNull @Label("订舱单ID")String bookingSpaceOrderId,
                     @Label("运单号") String trackingNo,@Label("备注")String common) {
        return bookingSpaceReceiptEditSer.createBookingSpaceReceipt(bookingSpaceOrderId,trackingNo,common);
    }

    @Override
    @Action
    @Order(2)
    @Label("创建移箱回执")
    public String createBookingSpaceReceiptMoveContainer(@NotNull @Label("移箱信息")MoveContainerVo vo) {
        return bookingSpaceReceiptEditSer.createBookingSpaceReceiptMoveContainer(vo);
    }
}
